
function CreateEllipticRgn(
    nLeftRect: Integer,  // x-coordinate of the upper-left corner
    nTopRect: Integer,  // y-coordinate of the upper-left corner
    nRightRect: Integer, // x-coordinate of the lower-right
    nBottomRect: Integer // y-coordinate of the lower-right corner
   ): HRGN;

function SetWindowRgn(
    hWnd: HWND, // handle to window whose window region is to be set
    hRgn: HRGN, // handle to region
    bRedraw: Boolean // window redraw flag
   );

procedure TForm1.FormCreate(Sender: TObject);
var
  hRegion: HRGN;
begin
  BorderStyle := bsNone;
  hRegion := CreateEllipticRgn(1, 1, 200, 200);
  SetWindowRgn(Handle, hRegion, True);
end;
